fix: AWF_ENABLE_HOST_ACCESS safety net sets '1' instead of 'true'#2227
fix: AWF_ENABLE_HOST_ACCESS safety net sets '1' instead of 'true'#2227
Conversation
The allowHostServicePorts safety net in docker-manager.ts was setting AWF_ENABLE_HOST_ACCESS='true', but entrypoint.sh checks for '1'. This caused host access features to silently fail when allowHostServicePorts was set without explicit enableHostAccess. Fixes #1728 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Fixes a mismatch between how AWF_ENABLE_HOST_ACCESS was being set in the TypeScript “safety net” path and how it’s checked in the agent container scripts, which could cause host access features to silently not activate when allowHostServicePorts is used programmatically.
Changes:
- Update the
allowHostServicePortssafety net to setAWF_ENABLE_HOST_ACCESSto'1'(instead of'true') for consistency with container-side checks. - Add a unit test covering the safety-net behavior when
allowHostServicePortsis set withoutenableHostAccess.
Show a summary per file
| File | Description |
|---|---|
| src/docker-manager.ts | Aligns AWF_ENABLE_HOST_ACCESS safety-net value with shell scripts expecting "1". |
| src/docker-manager.test.ts | Adds regression test ensuring the safety net sets AWF_ENABLE_HOST_ACCESS when allowHostServicePorts is provided without enableHostAccess. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 0
|
Smoke Test Results ✅ GitHub MCP: Retrieved last 2 merged PRs Overall: PASS
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
chore: recompile all agentic workflows Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "registry.npmjs.org"See Network Configuration for more information.
|
Smoke Test Results
Overall: FAIL —
|
Chroot Version Comparison Results
Overall: ❌ Not all tests passed — Python and Node.js versions differ between host and chroot environments.
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
|
🔬 Smoke Test Results
Overall: PASS PR by
|
|
Smoke Test: Copilot BYOK (Offline) Mode — Run #24971929239
Running in BYOK offline mode ( Overall: PASS
|
Problem
The
allowHostServicePortssafety net indocker-manager.ts(line 1070) was setting:But
containers/agent/entrypoint.sh:567checks:This mismatch meant host access features silently failed when
allowHostServicePortswas set without explicitenableHostAccess.Fix
Changed
'true'→'1'to match the convention used everywhere else (the primary path at line 1603,setup-iptables.sh, andentrypoint.sh).Testing
should set AWF_ENABLE_HOST_ACCESS to 1 via safety net when allowHostServicePorts is set without enableHostAccessFixes #1728